package utils

import (
	"order/model"
	"order/order"
)

func OrderGoodsModelToProto(o model.OrderGoods) *order.OrderGoodsData {
	return &order.OrderGoodsData{
		Id:          int32(o.ID),
		SonOrderNum: o.SonOrderNum,
		OrderId:     o.OrderId,
		GoodsSkuId:  o.GoodsSkuId,
		Number:      o.Number,
		SumPrice:    o.SumPrice,
		Status:      o.Status,
		RefundTime:  o.RefundTime.Time.String(),
		CreatedAt:   o.CreatedAt.String(),
		UpdatedAt:   o.UpdatedAt.String(),
		DeletedAt:   o.DeletedAt.Time.Format("2006-01-02 15:04:05"),
	}
}
